5.0b22 introduces the Tcl function-tracing command 'traceFunc'. traceFunc allows you to trace a specfic function whenever it is called, sending the output to another window. The indented trace of the function includes all parameters, each argument enclosed within single quotes, as well as the function result. The syntax of the function is:traceFunc on <funcName> <winName>traceFunc offtraceFunc statusFor example, if I want to trace the proc 'nextFunc' (defined in procs.tcl), the following might be a log of my activity at the Tcl shell:Welcome to Alpha's Tcl shell.Alpha> traceFunc on nextFunc traceWinAlpha> traceFunc statusFunc-tracing on, func: nextFunc, win: traceWinAlpha> Now I create a new window, "dirty" it so that I can get a save dialog, and save it as 'traceWin'. Note that tracing is only sent to open windows, so I must leave 'traceWin' open.Then I open any random non-C file (because I want the function to fail), go to the beginning of the file, and use the Utils:Execute menu command to run 'nextFunc' (type clover-', then nextF<space>). The output should look something like the following: nextFunc searchFunc '1' getPos OK: 38530 select '38530' OK: saveVars OK: if '(1==1)' '
nextLine
' 'else' '
previousLine
' nextLine OK: OK: getPos OK: 38573 set 'pos' '38573' OK: 38573 setVar 'regExpr' '1' OK: setVar 'forward' '1' OK: setVar 'ignoreCase' '1' OK: search '^[^ \t\(#\r/@].*\(.*\)$' '38573' ERROR: Search unsuccessful ERROR: Search unsuccessfulERROR: Search unsuccessfulThe trace output shows that the problem was an unsuccessful search. In this case, a dialog informed us of this fact anyway, but many Alpha routines are not as friendly when it comes to error messages.